<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="mvc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; utf-8">
    <title><s:text name="menu.item.management" /> &mdash; <s:text name="application.name" /></title>
    <link rel="stylesheet" href="/resources/css/reformator.css" />
    <script type="text/javascript" src="/resources/javascript/reformator.js"></script>
</head>
<body>

<mvc:h1 key="menu.item.management" />


<mvc:message />

<s:form action="/admin/menu" method="post">
    <s:if test="%{edit}">
        <s:hidden key="item.key" />
        <s:hidden key="item.id" />
        <s:hidden key="item.contentId" />
    </s:if>
    <s:textfield key="item.name" />
    <s:select list="menuItems" key="item.parentItemKey" value="item.parentItemKey.string" emptyOption="true" />

    <s:textfield key="item.urlString" />
    <s:textfield key="item.redirectUrl" />
    <s:textarea key="item.content" cssClass="HTML" />
    <s:textfield key="item.order" />
    <s:checkbox key="item.hidden" />

    <s:submit method="cancel" key="form.cancel"  />
    <s:submit method="save" key="form.submit"/>
</s:form>

<script type="text/javascript">
    reformator.auto({bar: true})
</script>

</body>
</html>